package com.bwie.bargain.dao;

import com.bwie.bargain.entity.BarorderEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;

/**
 * 
 * 
 * @author ShuangzhiZhao
 * @email 466505908@qq.com
 * @date 2022-03-13 19:25:33
 */
@Mapper
public interface BarorderDao extends BaseMapper<BarorderEntity> {

    void updatelastPrice(@Param("oid") Long oid, @Param("lastPrice") BigDecimal lastPrice);

    BarorderEntity selectByUidAid(@Param("userId") Long userId, Long activityId);

    double selectSumPrice(@Param("userId") Long userId, @Param("oid") Long oid);

    void updatePayPrice(@Param("oid") Long oid, @Param("subtract") BigDecimal subtract);

    int selectSumCount(@Param("userId") Long userId, @Param("oid") Long oid);
}
